<template>
  <div class="app-container">
    <!--操作按钮-->
    <div style="padding-bottom: 30px;" class="operation_container">
      <ul>
        <li><el-button size="mini" @click="handleCancel">返回</el-button></li>
      </ul>
    </div>
    <el-tabs v-model="activeName" type="border-card">
      <el-tab-pane label="基本信息" name="1">
        <supplier-form-com :data="data" />
      </el-tab-pane>
      <el-tab-pane label="所属客户" name="2">
        <supplier-store-list-com :store-list="data.storeList" />
      </el-tab-pane>
      <el-tab-pane label="所卖商品" name="3">
        <supplier-goods-list-com :goods-list="data.goodsList" />
      </el-tab-pane>
<el-tab-pane label="用户账户" name="4">
        <supplier-users-list-com :users-list="data.usersList" />
      </el-tab-pane>
   <!--   <el-tab-pane label="应收明细" name="4">
        <gabege-order-accounting-ap-list-com :ap-list="data.apList" />
      </el-tab-pane> -->
      <!-- <el-tab-pane label="打包明细" name="4">
        <gabege-order-pack-list-com :gabege-order="data" />
      </el-tab-pane> -->
    </el-tabs>
  </div>
</template>

<script>
import appConstant from '@/constant/AppConstant'
import SupplierApi from '@/api/basic/SupplierApi'
import SupplierFormCom from '@/views/basic/components/SupplierFormCom'
import SupplierStoreListCom from '@/views/basic/components/SupplierStoreListCom'
import SupplierGoodsListCom from '@/views/basic/components/SupplierGoodsListCom'

import SupplierUsersListCom from '@/views/basic/components/SupplierUsersListCom'

export default {
  components: {
    SupplierFormCom,
    SupplierStoreListCom,
    SupplierUsersListCom,
    SupplierGoodsListCom
  },
  data() {
    return {
      activeName: '1',
      selects: {},
      operation: undefined,
      data: {
        isValid: appConstant.Y
      }
    }
  },
  created() {
    this.initForm()
    this.loadSelects()
  },
  methods: {
    initForm() {
      const id = this.$route.params.id
      SupplierApi.get(id).then(response => {
        this.data = response.data
        // 初始化起运地、目的地数据

      })
    },
    loadSelects() {},
    handleCancel() {
      this.$router.go(-1)
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
</style>
